<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: libemb::Time Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>libemb</b></li><li class="navelem"><a class="el" href="classlibemb_1_1_time.html">Time</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classlibemb_1_1_time-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">libemb::Time Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>时间类  
 <a href="classlibemb_1_1_time.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_date_time_8h_source.html">DateTime.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa79edfa0c80cde0b20812f933044e2fa"><td class="memItemLeft" align="right" valign="top"><a id="aa79edfa0c80cde0b20812f933044e2fa"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Time</b> (int sec, int us)</td></tr>
<tr class="separator:aa79edfa0c80cde0b20812f933044e2fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a228878c8d763ce96ddbaeaa4026fc4ea"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#a228878c8d763ce96ddbaeaa4026fc4ea">secondPart</a> ()</td></tr>
<tr class="memdesc:a228878c8d763ce96ddbaeaa4026fc4ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取秒数  <a href="classlibemb_1_1_time.html#a228878c8d763ce96ddbaeaa4026fc4ea">More...</a><br /></td></tr>
<tr class="separator:a228878c8d763ce96ddbaeaa4026fc4ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab73161929bd3c031a0c83dbdb64969ec"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#ab73161929bd3c031a0c83dbdb64969ec">microSecondPart</a> ()</td></tr>
<tr class="memdesc:ab73161929bd3c031a0c83dbdb64969ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取微秒数  <a href="classlibemb_1_1_time.html#ab73161929bd3c031a0c83dbdb64969ec">More...</a><br /></td></tr>
<tr class="separator:ab73161929bd3c031a0c83dbdb64969ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe080ee72473e1d9bee1649d92b2c84f"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#afe080ee72473e1d9bee1649d92b2c84f">toString</a> ()</td></tr>
<tr class="memdesc:afe080ee72473e1d9bee1649d92b2c84f"><td class="mdescLeft">&#160;</td><td class="mdescRight">时间转换成字符串  <a href="classlibemb_1_1_time.html#afe080ee72473e1d9bee1649d92b2c84f">More...</a><br /></td></tr>
<tr class="separator:afe080ee72473e1d9bee1649d92b2c84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad81d9ea2672c3ff82dce73ab414ffedd"><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#ad81d9ea2672c3ff82dce73ab414ffedd">toMicroSeconds</a> ()</td></tr>
<tr class="memdesc:ad81d9ea2672c3ff82dce73ab414ffedd"><td class="mdescLeft">&#160;</td><td class="mdescRight">转换成微秒数  <a href="classlibemb_1_1_time.html#ad81d9ea2672c3ff82dce73ab414ffedd">More...</a><br /></td></tr>
<tr class="separator:ad81d9ea2672c3ff82dce73ab414ffedd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5224b363380a72819c867ef8f97362b7"><td class="memItemLeft" align="right" valign="top"><a id="a5224b363380a72819c867ef8f97362b7"></a>
<a class="el" href="classlibemb_1_1_time.html">Time</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator+</b> (const <a class="el" href="classlibemb_1_1_time.html">Time</a> &amp;t)</td></tr>
<tr class="separator:a5224b363380a72819c867ef8f97362b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f2995a114e26e2e9edd02aad812eb2a"><td class="memItemLeft" align="right" valign="top"><a id="a0f2995a114e26e2e9edd02aad812eb2a"></a>
<a class="el" href="classlibemb_1_1_time.html">Time</a>&#160;</td><td class="memItemRight" valign="bottom"><b>operator-</b> (const <a class="el" href="classlibemb_1_1_time.html">Time</a> &amp;t)</td></tr>
<tr class="separator:a0f2995a114e26e2e9edd02aad812eb2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a2ba57b58ddd4d78a8a9f1af9e688d895"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classlibemb_1_1_time.html">Time</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#a2ba57b58ddd4d78a8a9f1af9e688d895">currentTimeFromEpoch</a> ()</td></tr>
<tr class="memdesc:a2ba57b58ddd4d78a8a9f1af9e688d895"><td class="mdescLeft">&#160;</td><td class="mdescRight">当前时间(从1970-01-01 00:00:00 UTC开始)  <a href="classlibemb_1_1_time.html#a2ba57b58ddd4d78a8a9f1af9e688d895">More...</a><br /></td></tr>
<tr class="separator:a2ba57b58ddd4d78a8a9f1af9e688d895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a201aaffe9381aa0da6359f135d6bbecd"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classlibemb_1_1_time.html">Time</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#a201aaffe9381aa0da6359f135d6bbecd">currentTimeMonotonic</a> ()</td></tr>
<tr class="memdesc:a201aaffe9381aa0da6359f135d6bbecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">当前时间(从系统开机的时刻算起)  <a href="classlibemb_1_1_time.html#a201aaffe9381aa0da6359f135d6bbecd">More...</a><br /></td></tr>
<tr class="separator:a201aaffe9381aa0da6359f135d6bbecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f4cb755f2ecc129a570d0b3d1b42998"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlibemb_1_1_time.html#a2f4cb755f2ecc129a570d0b3d1b42998">usIntervalMonotonic</a> (<a class="el" href="classlibemb_1_1_time.html">Time</a> &amp;monoStartTime)</td></tr>
<tr class="memdesc:a2f4cb755f2ecc129a570d0b3d1b42998"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取时间间隔  <a href="classlibemb_1_1_time.html#a2f4cb755f2ecc129a570d0b3d1b42998">More...</a><br /></td></tr>
<tr class="separator:a2f4cb755f2ecc129a570d0b3d1b42998"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>时间类 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a2ba57b58ddd4d78a8a9f1af9e688d895"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ba57b58ddd4d78a8a9f1af9e688d895">&#9670;&nbsp;</a></span>currentTimeFromEpoch()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibemb_1_1_time.html">Time</a> libemb::Time::currentTimeFromEpoch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>当前时间(从1970-01-01 00:00:00 UTC开始) </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classlibemb_1_1_time.html" title="时间类">Time</a> </dd></dl>

</div>
</div>
<a id="a201aaffe9381aa0da6359f135d6bbecd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a201aaffe9381aa0da6359f135d6bbecd">&#9670;&nbsp;</a></span>currentTimeMonotonic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classlibemb_1_1_time.html">Time</a> libemb::Time::currentTimeMonotonic </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>当前时间(从系统开机的时刻算起) </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classlibemb_1_1_time.html" title="时间类">Time</a> </dd></dl>

</div>
</div>
<a id="ab73161929bd3c031a0c83dbdb64969ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab73161929bd3c031a0c83dbdb64969ec">&#9670;&nbsp;</a></span>microSecondPart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::Time::microSecondPart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取微秒数 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="a228878c8d763ce96ddbaeaa4026fc4ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a228878c8d763ce96ddbaeaa4026fc4ea">&#9670;&nbsp;</a></span>secondPart()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::Time::secondPart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取秒数 </p>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<a id="ad81d9ea2672c3ff82dce73ab414ffedd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad81d9ea2672c3ff82dce73ab414ffedd">&#9670;&nbsp;</a></span>toMicroSeconds()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long libemb::Time::toMicroSeconds </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>转换成微秒数 </p>
<dl class="section return"><dt>Returns</dt><dd>long long </dd></dl>

</div>
</div>
<a id="afe080ee72473e1d9bee1649d92b2c84f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe080ee72473e1d9bee1649d92b2c84f">&#9670;&nbsp;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string libemb::Time::toString </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>时间转换成字符串 </p>
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>

</div>
</div>
<a id="a2f4cb755f2ecc129a570d0b3d1b42998"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f4cb755f2ecc129a570d0b3d1b42998">&#9670;&nbsp;</a></span>usIntervalMonotonic()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int libemb::Time::usIntervalMonotonic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classlibemb_1_1_time.html">Time</a> &amp;&#160;</td>
          <td class="paramname"><em>monoStartTime</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取时间间隔 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">monoStartTime</td><td>起始时间 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_date_time_8h_source.html">DateTime.h</a></li>
<li>src/DateTime.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
